/*
 * TCSS 558
 * Distributed HashMap
 * Fall 2013
 * James Marquardt
 * Matt Adams
 * Justin Wong
 */
package model;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

/**
 * Class to store RemoteNodeData and Entries to transfer data between
 * actual nodes during RMI communication.
 * 
 * @author Matt Adams
 */
public class RemoteNodeDataAndEntries implements Serializable {

    /**
     * Serializable ID.
     */
    private static final long serialVersionUID = 4590894178725117609L;
    
    /**
     * Set of entries.
     */
    private Set<Entry> entries;
    
    /**
     * List of RemoteNodeData references.
     */
    private List<RemoteNodeData> remoteData;
    
    /**
     * Constructs RemoteNodeDataAndEntries object.
     * 
     * @param entries Entries to store.
     * @param remoteDataList RemoteNodeData references to store.
     */
    public RemoteNodeDataAndEntries(final List<RemoteNodeData> remoteData, final Set<Entry> entries) {
        this.entries = entries;
        this.remoteData = remoteData;        
    }
    
    /**
     * Sets new entries.
     * @param entries Entries to set.
     */
    public void setEntries(final Set<Entry> entries) {
        this.entries= entries;
    }
    
    /**
     * Sets new remote data references.
     * @param remoteData RemoteNodeData references to set.
     */
    public void setRemoteData(final List<RemoteNodeData> remoteData) {
        this.remoteData = remoteData;
    }
    
    /**
     * @return Returns entries.
     */
    public Set<Entry> getEntries() {
        return this.entries;
    }
    
    /**
     * @return Returns remote data references.
     */
    public List<RemoteNodeData> getRemoteData() {
        return this.remoteData;
    }
}
